stringlist: Clarify docs for gtk_string_list_get_string()
authorBenjamin Otte <otte@redhat.com>
Tue, 30 Jun 2020 17:35:43 +0000 (19:35 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 5 Jul 2020 00:59:21 +0000 (02:59 +0200)
Make sure it's obvious that it behaves like g_list_model_get_item() and
returns NULL for pos >= n_items.

gtk/gtkstringlist.c

index 70290fe24f36e0eeea15cff1d33bb5b7d7f1d9fc..e58a0fe6b690c4f1b24f298b098f69fcfb622b24 100644 (file)
@@ -588,8 +588,8 @@ gtk_string_list_remove (GtkStringList *self,
  * @self: a #GtkStringList
  * @position: the position to get the string for
  *
- * Gets the string that is at @position in @self. @position
- * must be smaller than the current length of the list.
+ * Gets the string that is at @position in @self. If @self
+ * does not contain @position items, %NULL is returned.
  *
  * This function returns the const char *. To get the
  * object wrapping it, use g_list_model_get_item().